package Pet;

/**
 * @author zihao
 * @date 2025/3/17 20:03
 * @VERSION
 * @description
 **/

/**
 * 狗类
 */
public class Dog {
    // 私有属性
    private String color;
    private String breed;

    // 空参构造
    public Dog() {
    }

    // 有参构造
    public Dog(String color, String breed) {
        this.color = color;
        this.breed = breed;
    }

    // getter 和 setter 方法
    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getBreed() {
        return breed;
    }

    public void setBreed(String breed) {
        this.breed = breed;
    }

    // 行为方法
    public void eat() {
        System.out.println(color + "的" + breed + "正在啃骨头…….");
    }

    public void lookHome() {
        System.out.println(color + "的" + breed + "正在看家.....");
    }
}